"Unable to connect to database"
hi we faced a problem with the sharepoint today after nearly a year, it showed that there was an error connecting to the database- Unable to connect to database. Check database connection information and make sure the database server is running. 1. We could not enter both the sharepoint and the sql server using the username and the password, we then reset the account password and managed to enter both the servers. 2.we restarted a number of sharepoint services using the new password, the one with SPadmin and all that we didnt change. the services were started and then.. 3. even then, the central administration could not load, I had to login into the sql server, restart the service using the new password ( the username remains ), After that, I started the sharepoint product /wizard technology wizard and try to connect to the existing farm, connected to the database , however the configuration failed with some "Failed to provision the SharePoint Central Administration Web Application" error. a google check resulted me in restarting the IIS manager which resulted in another error, w3svc service could not be found. Now, I cant start the IIS and I m trying to reinstall the IIS as mentioned in this blog, http://superuser.com/questions/176520/cannot-start-service-w3svc-on-computer The process is taking so long, and we need an immediate solution, even the database is ok, I wonder if i come back tommorrow, and if the IIS is ok and we managed to install it, can we reconfigure the product and configuration wizard, connect to the existing server, will a new central administration be created, I need the whole list of sites to be up like usual, will it affect anything if the wizard is configured
April 22nd, 2011 9:14am

I would log into your server that is hosting central admin using your farm admin account and run the following commands to reset the passwords (from the SharePoint perspective). http://support.microsoft.com/kb/934838 Kipp Sorensen
Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2011 2:36pm

If you need an immediate solution, i would recommend opening a support case. If your sites are down, people are freaking out and it is costing your company money....faster=better. If you want faster more resolute results from the forum, post environment info, what you did to break it (how your environment changed to cause the issue), and any log errors you are getting that seem relevant to the issue. The information you posted is useful, but information about the environment is almost as important as what the error messages are that you are getting, and what you've already done to troubleshoot. Environment Information that is helpful (There is more than this, but this is a solid start to get people thinking): SharePoint version (WSS2.0, 3.0, MOSS 2007.....etc....) Operating System of the server. Questions to answer before they are asked: What were you doing when you recieved the error message? How has your environment changed recently that may have caused the problem? Have you checked your ULS and Application logs for errors to see what may be causing this? If so, what are those errors? Dont take this post the wrong way. This is purely informational so you can provide a bit more info for people to go on, and to keep in mind for your future posts. It will save you, and the forum community alot of time. If more people included this information when posting, this world would be a better place :)
April 22nd, 2011 4:57pm

Hi Cally, if i were in your situation, i'll do the following steps:- 1- check if i my web application site content databases and SSP database are in good case. list all configuration and web application data. 2- then , disconnect from current farm if it still running. 3- create a new farm. and connect to this new farm. 4- start creating the web applications which you have listed it , then restore your databases on it. Best Regrads, Ahmed Madany MCTS @twitter http://twitter.com/ahmed_madany @Blog http://ahmedmadany.wordpress.com @tumblr http://ahmedmadany.tumblr.com
Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2011 5:19pm

I would log into your server that is hosting central admin using your farm admin account and run the following commands to reset the passwords (from the SharePoint perspective). http://support.microsoft.com/kb/934838 Kipp Sorensen
April 22nd, 2011 9:35pm

Hi Yeap am doing that, but the updatefarmcredentials is taking so long to complete, is it because of the number of sites in the sharepoint. cause, I did the same thing on my staging machine, and it ended fast but with an error. should I just wait, it has been more than 30 minutes
Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2011 10:04pm

SharePoint version (wss3.0, sharepoint 2007) Operating System of the server. - windows server datacenter 2008 service pack 2 What were you doing when you recieved the error message? - Actually nothing, I was just designing some page layouts, until users informed us that the error connecting to the database appeard How has your environment changed recently that may have caused the problem? - I believe so, we have a policy on our passwords and each account is tied to the AD, however, the sharepoint administrator account was excluded from this policy, usually we log in using the administrator to check the ssp, but for the past few days we did not login - I am copying the errors below, I had to change the computer name and the username for security purposes in the error below Have you checked your ULS and Application logs for errors to see what may be causing this? If so, what are those errors? - Yeap, Log Name: Application Source: Office SharePoint Server Date: 4/21/2011 6:22:20 AM Event ID: 7888 Task Category: Office Server General Level: Error Keywords: Classic User: N/A Computer: XXXXXXXXXXX - Sorry, can't show this..I am removing the name Description: A runtime exception was detected. Details follow. Message: Cannot open database "WSS_Content" requested by the login. The login failed. Login failed for user 'domainname\sharepointadmin1'. Techinal Details: System.Data.SqlClient.SqlException: Cannot open database "WSS_Content" requested by the login. The login failed. Login failed for user 'domainname\sharepointadmin1'. at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at Microsoft.Office.Server.Data.SqlSession.OpenConnection() at Microsoft.Office.Server.Data.SqlSession.ExecuteNonQuery(SqlCommand command) at Microsoft.Office.Server.Data.SqlDatabaseManager.HasAccess(String user) at Microsoft.Office.Server.Administration.SharedResourceProvider.SynchronizeAccessControl(SharedComponentSecurity sharedApplicationSecurity) at Microsoft.Office.Server.Administration.SharedResourceProvider.Microsoft.Office.Server.Administration.ISharedComponent.Synchronize() Event Xml: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name="Office SharePoint Server" /> <EventID Qualifiers="0">7888</EventID> <Level>2</Level> <Task>1516</Task> <Keywords>0x80000000000000</Keywords> <TimeCreated SystemTime="2011-04-20T22:22:20.000Z" /> <EventRecordID>1534333</EventRecordID> <Channel>Application</Channel> <Computer>GPMYSHR01.GREENPACKET.COM</Computer> <Security /> </System> <EventData> <Data>Cannot open database "WSS_Content" requested by the login. The login failed. Login failed for user 'domainname\sharepointadmin1'.</Data> <Data>System.Data.SqlClient.SqlException: Cannot open database "WSS_Content" requested by the login. The login failed. Login failed for user 'domainname\sharepointadmin1'. at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at Microsoft.Office.Server.Data.SqlSession.OpenConnection() at Microsoft.Office.Server.Data.SqlSession.ExecuteNonQuery(SqlCommand command) at Microsoft.Office.Server.Data.SqlDatabaseManager.HasAccess(String user) at Microsoft.Office.Server.Administration.SharedResourceProvider.SynchronizeAccessControl(SharedComponentSecurity sharedApplicationSecurity) at Microsoft.Office.Server.Administration.SharedResourceProvider.Microsoft.Office.Server.Administration.ISharedComponent.Synchronize()</Data> </EventData> </Event> So how..to go about it..I hope I have provided enough information. I am also trying to do what kipp has instructed.
April 22nd, 2011 10:14pm

SharePoint version (wss3.0, sharepoint 2007) Operating System of the server. - windows server datacenter 2008 service pack 2 What were you doing when you recieved the error message? - Actually nothing, I was just designing some page layouts, until users informed us that the error connecting to the database appeard How has your environment changed recently that may have caused the problem? - I believe so, we have a policy on our passwords and each account is tied to the AD, however, the sharepoint administrator account was excluded from this policy, usually we log in using the administrator to check the ssp, but for the past few days we did not login - I am copying the errors below, I had to change the computer name and the username for security purposes in the error below Have you checked your ULS and Application logs for errors to see what may be causing this? If so, what are those errors? - Yeap, Log Name: Application Source: Office SharePoint Server Date: 4/21/2011 6:22:20 AM Event ID: 7888 Task Category: Office Server General Level: Error Keywords: Classic User: N/A Computer: XXXXXXXXXXX - Sorry, can't show this..I am removing the name Description: A runtime exception was detected. Details follow. Message: Cannot open database "WSS_Content" requested by the login. The login failed. Login failed for user 'domainname\sharepointadmin1'. Techinal Details: System.Data.SqlClient.SqlException: Cannot open database "WSS_Content" requested by the login. The login failed. Login failed for user 'domainname\sharepointadmin1'. at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at Microsoft.Office.Server.Data.SqlSession.OpenConnection() at Microsoft.Office.Server.Data.SqlSession.ExecuteNonQuery(SqlCommand command) at Microsoft.Office.Server.Data.SqlDatabaseManager.HasAccess(String user) at Microsoft.Office.Server.Administration.SharedResourceProvider.SynchronizeAccessControl(SharedComponentSecurity sharedApplicationSecurity) at Microsoft.Office.Server.Administration.SharedResourceProvider.Microsoft.Office.Server.Administration.ISharedComponent.Synchronize() Event Xml: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name="Office SharePoint Server" /> <EventID Qualifiers="0">7888</EventID> <Level>2</Level> <Task>1516</Task> <Keywords>0x80000000000000</Keywords> <TimeCreated SystemTime="2011-04-20T22:22:20.000Z" /> <EventRecordID>1534333</EventRecordID> <Channel>Application</Channel> <Computer>ssss</Computer> <Security /> </System> <EventData> <Data>Cannot open database "WSS_Content" requested by the login. The login failed. Login failed for user 'domainname\sharepointadmin1'.</Data> <Data>System.Data.SqlClient.SqlException: Cannot open database "WSS_Content" requested by the login. The login failed. Login failed for user 'domainname\sharepointadmin1'. at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at Microsoft.Office.Server.Data.SqlSession.OpenConnection() at Microsoft.Office.Server.Data.SqlSession.ExecuteNonQuery(SqlCommand command) at Microsoft.Office.Server.Data.SqlDatabaseManager.HasAccess(String user) at Microsoft.Office.Server.Administration.SharedResourceProvider.SynchronizeAccessControl(SharedComponentSecurity sharedApplicationSecurity) at Microsoft.Office.Server.Administration.SharedResourceProvider.Microsoft.Office.Server.Administration.ISharedComponent.Synchronize()</Data> </EventData> </Event> So how..to go about it..I hope I have provided enough information. I am also trying to do what kipp has instructed.
Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2011 10:14pm

got this error when I ran error updating the administration application pool credentials
April 23rd, 2011 3:51am

got this error when I ran the updatepassword command - error updating the administration application pool credentials - this came from the event log - an exception occured while executing the application server administration job + there was an error encrypting or decrypting crdentials, either a credential update is currently being performed or you must update the farm credentials on this server bfore you can perform this task
Free Windows Admin Tool Kit Click here and download it now
April 23rd, 2011 3:52am

So looks like your farm admin account has lost permissions on the SQL Server side of things. Make sure that the account has the proper permissions on SQL. I would reference this technet for understanding of the permissions needed. http://technet.microsoft.com/en-us/library/cc263445(office.12).aspx Also, check this: http://trysharepoint.blogspot.com/2010/03/there-was-error-encrypting-or.html Kipp Sorensen
April 25th, 2011 5:21pm

So looks like your farm admin account has lost permissions on the SQL Server side of things. Make sure that the account has the proper permissions on SQL. I would reference this technet for understanding of the permissions needed. http://technet.microsoft.com/en-us/library/cc263445(office.12).aspx Also, check this: http://trysharepoint.blogspot.com/2010/03/there-was-error-encrypting-or.html Kipp Sorensen
Free Windows Admin Tool Kit Click here and download it now
April 26th, 2011 12:19am

Hello cally_kalpana, Check this post, I think it will help you to resolve this error: http://www.sharepointserverrecovery.com/blog/how-to-fix-%E2%80%9Cunable-to-connect-database%E2%80%9D-error/ Thanks Prett
May 4th, 2011 1:40am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics